package com.how2java.tmall.web;

import com.how2java.tmall.service.HistoryService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.servlet.http.HttpSession;

@Controller
public class HistoryController {
    @Autowired
    HistoryService historyService;

    @GetMapping("/history/table")
    @ResponseBody
    public String history() throws Exception {
        historyService.findGoodsHistoryByGoodsId(1);
        return "";
    }

    @GetMapping("/forehistable")
    public String history(HttpSession session) {
        return "user/his";
    }
}

